﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VipMemberSearch.aspx.cs"
    Inherits="VipMemberSearch" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>欢迎使用工会管理系统</title>
    <link href="../style/main.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="/css/jquery-ui-1.7.2.custom.css" />
    <link rel="stylesheet" type="text/css" href="../JqueryUI/themes/ui-lightness/jquery-ui-1.7.2.custom.css">
    <link rel="stylesheet" type="text/css" href="/css/jquery-ui-1.7.2.custom.css" />

    <script type="text/javascript" src="../javascript/jquery-1.3.2.js"></script>

    <script type="text/javascript" src="../javascript/jquery-ui-1.7.2.custom.js"></script>

    <script type="text/javascript" src="../javascript/messageBox.js"></script>

    <script type="text/javascript" src="../javascript/formValidator.js"></script>

    <script type="text/javascript" src="../javascript/formValidatorRegex.js"></script>

    <script type="text/javascript" src="../javascript/Public.js"></script>

    <script type="text/javascript" src="../javascript/jquery-calendar.js"></script>
    
     <script type="text/javascript" src="../javascript/jquery-calendar.js"></script>
     <script type="text/javascript" src="../javascript/cal.js"></script>

        <link rel="stylesheet" type="text/css" href="../css/calendar.css" />
    <script type="text/javascript" language="javascript">

        $(document).ready(function() {

            //入会时间 From
            $("#txtRegTimeFrom").simpleDatepicker({ startdate: 1965, enddate: 2050 });    
           //入会时间 To
            $("#txtRegTimeTo").simpleDatepicker({ startdate: 1965, enddate: 2050 });
             //员工信息编辑
            $(".btnEdit").click(function() {
                window.showModalDialog("VipMemberCardAdd.aspx?Random=" + Math.random() + " &ID=" + ($.trim($(this).parent().parent().find('td:eq(0)').text())), window, "dialogWidth:612px;dialogHeight:590px;status=no;help=no;scroll:no");
                var submitForm = document.getElementById("mainForm");
                submitForm.submit();
            });
            $("#btnAdd").click(function() {
                window.showModalDialog("VipMemberCardAdd.aspx?Random=" + Math.random(), window, "dialogWidth:612px;dialogHeight:590px;status=no;help=no;scroll:no");
                var submitForm = document.getElementById("mainForm");
                submitForm.submit();
            });

            $("#btnPrint").click(function() {
                //window.open("VipMemberSearchPrint.aspx?Random=" + Math.random() + " &strWhere=" + encodeURIComponent($("#txtStrWhere").val()), "newwindow", " width=1000px, top=0,left=0, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no");
                openwindow("VipMemberSearchPrint.aspx?Random=" + Math.random() + " &strWhere=" + encodeURIComponent($("#txtStrWhere").val()), 'newwindow', 950, 500);
            });
            //员工家庭成员信息
            $(".btnFamily").click(function() {
                window.showModalDialog("VipFamilyList.aspx?Random=" + Math.random() + "&ID=" + ($.trim($(this).parent().parent().find('td:eq(0)').text())) + "&Name=" + encodeURIComponent(($.trim($(this).parent().parent().find('td:eq(1)').text()))), window, "dialogWidth:800px;dialogHeight:400px;status=no;help=no ");
            });
        });
    </script>

</head>
<body>
    <form id="mainForm" runat="server">
    <input type="hidden" id="txtStrWhere" value="<%=strWhere  %>" />
    <table width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <table width="99%" cellpadding="0" cellspacing="0" class="table">
                    <tr>
                        <td valign="top">
                            <table width="100%" class="top" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td style="height: 22px;">
                                        &nbsp;<b>当前位置:</b>&nbsp;<a href="#">会员管理</a>&nbsp;>>&nbsp;<a href="#">会员查询</a>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 5px">
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle" style="border: thin solid #C0C0C0; background-color: #C5E5FC">
                            <table cellpadding="0" cellspacing="0">
                                <tr>
                                    <td style="padding-left: 12px; width: 240">
                                        单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位：<asp:DropDownList ID="ddlUnit"
                                            runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlUnit_SelectedIndexChanged">
                                        </asp:DropDownList>
                                    </td>
                                    <td style="padding-left: 12px; width: 170">
                                        所属部门：<asp:DropDownList ID="ddlDepartment" runat="server">
                                            <asp:ListItem Selected="True" Value="-1">请选择</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td style="padding-left: 12px; width: 170">
                                        班&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;组：<asp:DropDownList ID="ddlGroup"
                                            runat="server">
                                            <asp:ListItem Selected="True" Value="-1">请选择</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td style="padding-left: 12px; width: 160">
                                        姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：<asp:TextBox ID="txtName" runat="server"
                                            Width="70px"></asp:TextBox>
                                    </td>
                                    <td style="padding-left: 12px; width: 160">
                                        性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：<asp:DropDownList ID="ddlSex"
                                            runat="server">
                                            <asp:ListItem Selected="True" Value="-1">请选择</asp:ListItem>
                                            <asp:ListItem Value="0">--男--</asp:ListItem>
                                            <asp:ListItem Value="1">--女--</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="padding-left: 12px">
                                          文化程度：<asp:DropDownList ID="ddlEducation" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                    <td style="padding-left: 12px">
                                        是否会员：<asp:DropDownList ID="ddlIsVip" runat="server">
                                            <asp:ListItem Selected="True" Value="-1">请选择</asp:ListItem>
                                            <asp:ListItem Value="1">--是--</asp:ListItem>
                                            <asp:ListItem Value="0">--否--</asp:ListItem>
                                        </asp:DropDownList>
                                        &nbsp;
                                    </td>
                                    <td style="padding-left: 12px">
                                        政治面貌：<asp:DropDownList ID="ddlPolitical" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                    <td style="padding-left: 12px">
                                        会员证号：<asp:TextBox ID="txtVIPID" runat="server" Width="70px"></asp:TextBox>
                                    </td>
                                    <td style="padding-left: 12px">
                                        备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：<asp:TextBox ID="txtRemark" runat="server"
                                            Width="70px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="padding-left: 12px">
                                                入会时间：<asp:TextBox ID="txtRegTimeFrom" runat="server" Width="75px" CssClass="datepicker1 input_datepicker"> </asp:TextBox>至<asp:TextBox
                                            ID="txtRegTimeTo" runat="server" Width="75px" CssClass="datepicker1 input_datepicker"> </asp:TextBox>
                              
                                    </td>
                                    <td style="padding-left: 12px">
                                        属&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;性：<asp:DropDownList ID="ddlAttr"
                                            runat="server">
                                        </asp:DropDownList>
                                    </td>
                                    <td style="padding-left: 12px">
                                        职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称：<asp:DropDownList ID="ddlTitle"
                                            runat="server">
                                        </asp:DropDownList>
                                    </td>
                                    <td>
                                    </td>
                                    <td>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 5px">
                        </td>
                    </tr>
                    <tr>
                        <td align="right" valign="middle" style="border: thin solid #C0C0C0; background-color: #C5E5FC">
                            <table width="100%" cellpadding="1" cellspacing="1">
                                <tr>
                                    <td>
                                        <img id="btnAdd" alt="" src="/Images/button/btnAddVipMember.gif" />
                                        &nbsp;&nbsp;
                                        <asp:ImageButton ID="ibtnSearch" runat="server" ImageUrl="~/Images/button/btnSearch.gif"
                                            OnClick="ibtnSearch_Click" />
                                        &nbsp;&nbsp;
                                        <img id="btnPrint" alt="打印" src="../Images/button/btnPrint.gif" />
                                        &nbsp;&nbsp;
                                        <asp:ImageButton ID="btnExport" runat="server" ImageUrl="~/Images/button/btnExport.gif"
                                            OnClick="btnExport_Click" />
                                        &nbsp;&nbsp; &nbsp;&nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 5px">
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <asp:Repeater ID="rptList" runat="server">
                                <HeaderTemplate>
                                    <table style="width: 100%; background-color: Silver" cellpadding="1px" cellspacing="1px">
                                        <tr>
                                            <th style="height: 22px; background-color: #B2DBF7; display: none">
                                                编号
                                            </th>
                                            <th style="height: 22px; background-color: #B2DBF7">
                                                姓名
                                            </th>
                                            <th style="height: 22px; background-color: #B2DBF7">
                                                单位
                                            </th>
                                            <th style="height: 20px; background-color: #B2DBF7">
                                                部门
                                            </th>
                                            <th style="height: 20px; background-color: #B2DBF7">
                                                班组
                                            </th>
                                            <th style="height: 20px; background-color: #B2DBF7">
                                                身份证号码
                                            </th>
                                            <th style="height: 20px; background-color: #B2DBF7">
                                                会员证号码
                                            </th>
                                            <th style="height: 20px; background-color: #B2DBF7">
                                                性别
                                            </th>
                                            <th style="height: 20px; background-color: #B2DBF7">
                                                入会时间
                                            </th>
                                            <th style="height: 20px; background-color: #B2DBF7">
                                                联系电话
                                            </th>
                                            <th style="height: 20px; background-color: #B2DBF7">
                                                文化程度
                                            </th>
                                            <th style="height: 20px; background-color: #B2DBF7">
                                                政治面貌
                                            </th>
                                            <th style="height: 20px; background-color: #B2DBF7">
                                                职称
                                            </th>
                                            <th style="height: 20px; background-color: #B2DBF7">
                                                属性
                                            </th>
                                            <th colspan="2" style="height: 20px; background-color: #B2DBF7;">
                                                操作
                                            </th>
                                        </tr>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td style="display: none;">
                                            <%# Eval("ID")%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF">
                                            <%# DataBinder.Eval(Container.DataItem, "姓名")%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF">
                                            <%# GetUnitName(DataBinder.Eval(Container.DataItem, "单位"))%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF">
                                            <%# GetDepartmentName(DataBinder.Eval(Container.DataItem, "部门"))%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF">
                                            <%# GetGroupName(DataBinder.Eval(Container.DataItem, "班组"))%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF">
                                            <%# DataBinder.Eval(Container.DataItem, "身份证号")%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF">
                                            <%# DataBinder.Eval(Container.DataItem, "会员证号")%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF" align="center">
                                            <%#(DataBinder.Eval(Container.DataItem, "性别").ToString()=="0")?"男":"女"%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF" align="center">
                                            <%# Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "入会时间")).ToShortDateString()%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF">
                                            <%# DataBinder.Eval(Container.DataItem, "联系电话")%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF" align="center">
                                            <%# GetEducationName(DataBinder.Eval(Container.DataItem, "文化程度"))%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF" align="center">
                                            <%# GetPoliticalName(DataBinder.Eval(Container.DataItem, "政治面貌"))%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF" align="center">
                                            <%# GetTitleName(DataBinder.Eval(Container.DataItem, "职称"))%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF" align="center">
                                            <%# GetAttrName(DataBinder.Eval(Container.DataItem, "属性"))%>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF;">
                                            <a class="btnEdit" href="javascript:void(0)">编辑 </a>
                                        </td>
                                        <td style="height: 22px; background-color: #FFFFFF;">
                                            <a class="btnFamily" href="javascript:void(0)">家人信息修改 </a>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <FooterTemplate>
                                    </table>
                                </FooterTemplate>
                            </asp:Repeater>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页"
        FirstPageText="首页" LastPageText="尾页" NextPageText="后页" OnPageChanged="AspNetPager1_PageChanged"
        PrevPageText="前页" ShowCustomInfoSection="Left">
    </webdiyer:AspNetPager>
    </form>
</body>
</html>
